/** 
  Copyright (c) 2008, 2009 Claudio Imbrenda
  This program is released under the terms of the
  GNU GPL version 3 or later.
*/
package macchina.telescriventi;

import java.io.*;
import macchina.*;
        
/**
 *
 * @author Claudio Imbrenda
 */
public class BinaryFileTelescrivente implements RegistroUscita{

  private FileWriter of;
  
  public BinaryFileTelescrivente(File f)throws FileNotFoundException,IOException{
    of=new FileWriter(f);
  }
  
  public void write(byte w) {
    try{
      byte cc=(byte)(w&0x1f);
      of.write(cc);
      of.flush();
    }catch(IOException e){e.printStackTrace();}
  }
  
//  public void c()throws IOException{of.close();}

}
